#include <iostream>
using namespace std;

int main()
{
	int rabbit, chicken;
	int head = 35;
	int foot = 94;
	chicken = (4*head - foot) / 2;
	rabbit = head - chicken;
	cout << rabbit << " " << chicken << endl; 
	return 0; 
}
